package bancosys.tec.services.export.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import jmine.tec.persist.annotation.Alias;
import jmine.tec.persist.annotation.Index;
import bancosys.tec.component.Documentation;
import bancosys.tec.persist.bussobj.PersistableBusinessObject;

@Entity
@Table(name = "ASSOC_MOCK_ENTITY")
@Alias("AMOCK")
@SequenceGenerator(name = "SEQ_AMOCK", sequenceName = "SEQ_AMOCK")
@Documentation("TABELA DE TESTES.")
public class AssociatedMockEntity extends PersistableBusinessObject {

    private Long id;

    private MockEntity mock;

    private String value;

    public AssociatedMockEntity(String value, MockEntity mock) {
        this.value = value;
        this.mock = mock;
    }

    public AssociatedMockEntity() {
        super();
    }

    /**
     * @return the id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_AMOCK")
    @Column(name = "ID")
    @Documentation("TABELA DE TESTES.")
    public Long getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "VALUE")
    @Documentation("TABELA DE TESTES.")
    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Index(suffix = "JT_0")
    @ManyToOne
    @JoinColumn(name = "COD_MOCK")
    @Documentation("TABELA DE TESTES.")
    public MockEntity getMock() {
        return this.mock;
    }

    public void setMock(MockEntity mock) {
        this.mock = mock;
    }
}